package com.tcu.base.utils;

import java.util.Random;

public class SaltUtil {
    private static final char[] SALT_MINE = "aqEzwFK/q:&]B#JXJ{e)8WSc.0!vgk".toCharArray();
    public static String generateSalt(Integer n){
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            char s = SALT_MINE[new Random().nextInt(SALT_MINE.length)];
            sb.append(s);
        }
        return sb.toString();
    }
}
